<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Check DNS records corresponding to a given Internet host name or IP address</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.network.html">Network 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.closelog.html">closelog</a></div>
 <div class="up"><a href="ref.network.html">Network 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.checkdnsrr" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">checkdnsrr</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">checkdnsrr</span> &mdash; <span class="dc-title">Check DNS records corresponding to a given Internet host name or IP address</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.checkdnsrr-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>checkdnsrr</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$type</code><span class="initializer"> = &quot;MX&quot;</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Searches DNS for records of type <em><code class="parameter">type</code></em>
   corresponding to <em><code class="parameter">host</code></em>. 
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.checkdnsrr-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">host</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">host</code></em> may either be the IP address in
       dotted-quad notation or the host name.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">type</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">type</code></em> may be any one of: A, MX, NS, SOA,
       PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.checkdnsrr-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if any records are found; returns <strong><code>FALSE</code></strong> if no records
   were found or if an error occurred.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.checkdnsrr-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.3.0</td>
       <td>
         This function is now available on Windows platforms.
       </td>
      </tr>

      <tr>
       <td>5.2.4</td>
       <td>
        TXT <em><code class="parameter">type</code></em> was added.
       </td>
      </tr>

      <tr>
       <td>5.0.0</td>
       <td>
        AAAA <em><code class="parameter">type</code></em> was added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.checkdnsrr-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    For compatibility with Windows before this was implemented, then try the
    <a href="http://pear.php.net/" class="link external">&raquo;&nbsp;PEAR</a> class
    <a href="http://pear.php.net/package/Net_DNS" class="link external">&raquo;&nbsp;Net_DNS</a>.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.checkdnsrr-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.dns-get-record.html" class="function" rel="rdfs-seeAlso">dns_get_record()</a> - Fetch DNS Resource Records associated with a hostname</span></li>
    <li class="member"><span class="function"><a href="function.getmxrr.html" class="function" rel="rdfs-seeAlso">getmxrr()</a> - Get MX records corresponding to a given Internet host name</span></li>
    <li class="member"><span class="function"><a href="function.gethostbyaddr.html" class="function" rel="rdfs-seeAlso">gethostbyaddr()</a> - Get the Internet host name corresponding to a given IP address</span></li>
    <li class="member"><span class="function"><a href="function.gethostbyname.html" class="function" rel="rdfs-seeAlso">gethostbyname()</a> - Get the IPv4 address corresponding to a given Internet host name</span></li>
    <li class="member"><span class="function"><a href="function.gethostbynamel.html" class="function" rel="rdfs-seeAlso">gethostbynamel()</a> - Get a list of IPv4 addresses corresponding to a given Internet host
   name</span></li>
    <li class="member">the named(8) manual page</li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.network.html">Network 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.closelog.html">closelog</a></div>
 <div class="up"><a href="ref.network.html">Network 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
